#pragma once
#include "motion/rtcmds.h"
#include "zuc/nml_intf/zucpos.h"
#include "zuc/motion/motion.h"

#define MOTION_CMD_CLASS_NAME(x) CMD_CLASS_NAME(x) "[MOTION CMD]"

class CmdSetTorqueControlEnable : public mot::MultiRobCmd
{
public:
    CmdSetTorqueControlEnable(int grp_id, int torque_last_period, int torque_control_enable)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetTorqueControlEnable);
        torque_last_period_ = torque_last_period;
        torque_control_enable_ = torque_control_enable;
    };
    ~CmdSetTorqueControlEnable() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int torque_last_period_;
    int torque_control_enable_;
};

// @FIXME liwang
class CmdTrackingEnable : public mot::MultiRobCmd
{
public:
    CmdTrackingEnable(int grp_id,
                      double x,
                      double y,
                      double z,
                      double conveyorDir,
                      double conveyorPulseEquivalent,
                      double max_distance,
                      double convyr_type,
                      double rotate_tool,
                      double o_to_world)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdTrackingEnable);
        y_ = y;
        conveyorDir_ = conveyorDir;
        conveyorPulseEquivalent_ = conveyorPulseEquivalent;
        max_distance_ = max_distance;
        convyr_type_ = convyr_type;
        z_ = z;
        x_ = x;
        rotate_tool_ = rotate_tool;
        o_to_world_ = o_to_world;
    };
    ~CmdTrackingEnable() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double y_;
    double conveyorDir_;
    double conveyorPulseEquivalent_;
    double max_distance_;
    double convyr_type_;
    double z_;
    double x_;
    double rotate_tool_;
    double o_to_world_;
};

class CmdToppraFinishLeftTc : public mot::MultiRobCmd
{
public:
    CmdToppraFinishLeftTc(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdToppraFinishLeftTc);
    };
    ~CmdToppraFinishLeftTc() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdToppraFirstCommand : public mot::MultiRobCmd
{
public:
    CmdToppraFirstCommand(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdToppraFirstCommand);
    };
    ~CmdToppraFirstCommand() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdTrackingDisable : public mot::MultiRobCmd
{
public:
    CmdTrackingDisable(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdTrackingDisable);
    };
    ~CmdTrackingDisable() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdAbortJointAndTraj : public mot::MultiRobCmd
{
public:
    CmdAbortJointAndTraj(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdAbortJointAndTraj);
    };
    ~CmdAbortJointAndTraj() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdAbort : public mot::MultiRobCmd
{
public:
    CmdAbort(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdAbort);
    };
    ~CmdAbort() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdFree : public mot::MultiRobCmd
{
public:
    CmdFree(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdFree);
    };
    ~CmdFree() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdCoord : public mot::MultiRobCmd
{
public:
    CmdCoord(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdCoord);
    };
    ~CmdCoord() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdTeleop : public mot::MultiRobCmd
{
public:
    CmdTeleop(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdTeleop);
    };
    ~CmdTeleop() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdTeleopTool : public mot::MultiRobCmd
{
public:
    CmdTeleopTool(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdTeleopTool);
    };
    ~CmdTeleopTool() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdServojop : public mot::MultiRobCmd
{
public:
    CmdServojop(int grp_id, bool enable)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdServojop);
        enable_ = enable;
    };
    ~CmdServojop() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
    bool enable_;
};

class CmdAdmittance : public mot::MultiRobCmd
{
public:
    CmdAdmittance(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdAdmittance);
    };
    ~CmdAdmittance() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdDrag : public mot::MultiRobCmd
{
public:
    CmdDrag(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdDrag);
    };
    ~CmdDrag() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdSetEndForceCondition : public mot::MultiRobCmd
{
public:
    CmdSetEndForceCondition(int grp_id, int axis, const EndForceCond& endForceCond)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetEndForceCondition);
        endForceCond_ = endForceCond;
        axis_ = axis;
    }
    ~CmdSetEndForceCondition() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int axis_;
    EndForceCond endForceCond_;
};

class CmdSetRobot7DofInvFlag : public mot::MultiRobCmd
{
public:
    CmdSetRobot7DofInvFlag(int grp_id, double inv_flag)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetRobot7DofInvFlag);
        inv_flag_ = inv_flag;
    };
    ~CmdSetRobot7DofInvFlag() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double inv_flag_;
};

class CmdSetRobotFullDhFlag : public mot::MultiRobCmd
{
public:
    CmdSetRobotFullDhFlag(int grp_id, int robot_full_dh_flag)
    {
        group_id_ = grp_id;
        robot_full_dh_flag_ = robot_full_dh_flag;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetRobot7DofArmAngle);
    };
    ~CmdSetRobotFullDhFlag() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int robot_full_dh_flag_;
};

class CmdSetRobot7DofArmAngle : public mot::MultiRobCmd
{
public:
    CmdSetRobot7DofArmAngle(int grp_id, double arm_angle)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetRobot7DofArmAngle);
        arm_angle_ = arm_angle;
    };
    ~CmdSetRobot7DofArmAngle() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double arm_angle_;
};

class CmdSetRobot7DofKineParamAlphaK : public mot::MultiRobCmd
{
public:
    CmdSetRobot7DofKineParamAlphaK(int grp_id, double k, double alpha)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetRobot7DofKineParamAlphaK);
        k_ = k;
        alpha_ = alpha;
    };
    ~CmdSetRobot7DofKineParamAlphaK() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double k_;
    double alpha_;
};

class CmdDisable : public mot::MultiRobCmd
{
public:
    CmdDisable(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdDisable);
    };
    ~CmdDisable() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdEnable : public mot::MultiRobCmd
{
public:
    CmdEnable(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdEnable);
    };
    ~CmdEnable() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
};

class CmdSetMaintenanceMode : public mot::MultiRobCmd
{
public:
    CmdSetMaintenanceMode(int grp_id, int maintenance)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetMaintenanceMode);
        maintenance_ = maintenance;
    };
    ~CmdSetMaintenanceMode() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int maintenance_;
};

class CmdSetPayloadTorqsensor : public mot::MultiRobCmd
{
public:
    CmdSetPayloadTorqsensor(int grp_id, const Payload& payload)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetPayloadTorqsensor);
        payload_ = payload;
    };
    ~CmdSetPayloadTorqsensor() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    Payload payload_;
};

class CmdSetOperationmode : public mot::MultiRobCmd
{
public:
    CmdSetOperationmode(int grp_id, int operationMode)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetOperationmode);
        operationMode_ = operationMode;
    };
    ~CmdSetOperationmode() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int operationMode_;
};

class CmdSetMaxFeedOverride : public mot::MultiRobCmd
{
public:
    CmdSetMaxFeedOverride(int grp_id, double maxFeedScale)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetMaxFeedOverride);
        maxFeedScale_ = maxFeedScale;
    };
    ~CmdSetMaxFeedOverride() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double maxFeedScale_;
};

class CmdSetupArcBlends : public mot::MultiRobCmd
{
public:
    CmdSetupArcBlends(int grp_id, const zuc_setup_arc_blends_t& setuparcblends)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetupArcBlends);
        setuparcblends_ = setuparcblends;
    };
    ~CmdSetupArcBlends() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    zuc_setup_arc_blends_t setuparcblends_;
};

class CmdSetClsnAccLimit : public mot::MultiRobCmd
{
public:
    CmdSetClsnAccLimit(int grp_id, double pos_clsn_acc, double ori_clsn_acc)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetClsnAccLimit);
        pos_clsn_acc_ = pos_clsn_acc;
        ori_clsn_acc_ = ori_clsn_acc;
    };
    ~CmdSetClsnAccLimit() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double pos_clsn_acc_;
    double ori_clsn_acc_;
};

class CmdExitProtect : public mot::MultiRobCmd
{
public:
    CmdExitProtect(int grp_id, int type)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdExitProtect);
        type_ = type;
    };
    ~CmdExitProtect() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int type_;
};

class CmdPercentageMode : public mot::MultiRobCmd
{
public:
    CmdPercentageMode(int grp_id, int level)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdPercentageMode);
        level_ = level;
    };
    ~CmdPercentageMode() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int level_;
};

class CmdReduceMode : public mot::MultiRobCmd
{
public:
    CmdReduceMode(int grp_id, int mode)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdReduceMode);
        mode_ = mode;
    };
    ~CmdReduceMode() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int mode_;
};

class CmdSetPercentageModeLevelVal : public mot::MultiRobCmd
{
public:
    CmdSetPercentageModeLevelVal(int grp_id, double level2_val, double level1_val)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetPercentageModeLevelVal);
        level2_val_ = level2_val;
        level1_val_ = level1_val;
    };
    ~CmdSetPercentageModeLevelVal() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double level2_val_;
    double level1_val_;
};

class CmdSetTrajsmooth : public mot::MultiRobCmd
{
public:
    CmdSetTrajsmooth(int grp_id, int trqlimitActive, int firfltActive)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetTrajsmooth);
        trqlimitActive_ = trqlimitActive;
        firfltActive_ = firfltActive;
    };
    ~CmdSetTrajsmooth() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int trqlimitActive_;
    int firfltActive_;
};

class CmdSetTrackingConfig : public mot::MultiRobCmd
{
public:
    CmdSetTrackingConfig(int grp_id, int link_di, int com_cycle_num, double synch_acc, int lctsynch)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetTrackingConfig);
        lctsynch_ = lctsynch;
        com_cycle_num_ = com_cycle_num;
        synch_acc_ = synch_acc;
        link_di_ = link_di;
    };
    ~CmdSetTrackingConfig() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int lctsynch_;
    int com_cycle_num_;
    double synch_acc_;
    int link_di_;
};

class CmdSetFullDhCom : public mot::MultiRobCmd
{
public:
    CmdSetFullDhCom(int grp_id, int full_dh_com)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetFullDhCom);
        full_dh_com_ = full_dh_com;
    };
    ~CmdSetFullDhCom() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int full_dh_com_;
};

class CmdSetEnableLimitLinearVelocity : public mot::MultiRobCmd
{
public:
    CmdSetEnableLimitLinearVelocity(int grp_id, int enableLimitLinearVel)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetEnableLimitLinearVelocity);
        enableLimitLinearVel_ = enableLimitLinearVel;
    };
    ~CmdSetEnableLimitLinearVelocity() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int enableLimitLinearVel_;
};

class CmdSetEnableLimitJointVelocity : public mot::MultiRobCmd
{
public:
    CmdSetEnableLimitJointVelocity(int grp_id, int enableLimitJointVel)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetEnableLimitJointVelocity);
        enableLimitJointVel_ = enableLimitJointVel;
    };
    ~CmdSetEnableLimitJointVelocity() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int enableLimitJointVel_;
};

class CmdSetPlannerJerk : public mot::MultiRobCmd
{
public:
    CmdSetPlannerJerk(int grp_id, double joint_jerk, double carte_jerk)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetPlannerJerk);
        joint_jerk_ = joint_jerk;
        carte_jerk_ = carte_jerk;
    };
    ~CmdSetPlannerJerk() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double joint_jerk_;
    double carte_jerk_;
};

class CmdSetTcpMaxError : public mot::MultiRobCmd
{
public:
    CmdSetTcpMaxError(int grp_id, double tcpmaxerror)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetTcpMaxError);
        tcpmaxerror_ = tcpmaxerror;
    };
    ~CmdSetTcpMaxError() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double tcpmaxerror_;
};

class CmdSetPbblendmode : public mot::MultiRobCmd
{
public:
    CmdSetPbblendmode(int grp_id, int pb_blend_mode)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetPbblendmode);
        pb_blend_mode_ = pb_blend_mode;
    };
    ~CmdSetPbblendmode() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int pb_blend_mode_;
};

class CmdSetEnableMovejmovelblend : public mot::MultiRobCmd
{
public:
    CmdSetEnableMovejmovelblend(int grp_id, int enableMovejMovelBlend)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetEnableMovejmovelblend);
        enableMovejMovelBlend_ = enableMovejMovelBlend;
    };
    ~CmdSetEnableMovejmovelblend() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int enableMovejMovelBlend_;
};

class CmdSetRateBlend : public mot::MultiRobCmd
{
public:
    CmdSetRateBlend(int grp_id, int max_fw_len, int topp_queue_len, int rate_blend)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetRateBlend);
        max_fw_len_ = max_fw_len;
        topp_queue_len_ = topp_queue_len;
        rate_blend_ = rate_blend;
    };
    ~CmdSetRateBlend() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int max_fw_len_;
    int topp_queue_len_;
    int rate_blend_;
};

class CmdSetEnableMovejmovejblend : public mot::MultiRobCmd
{
public:
    CmdSetEnableMovejmovejblend(int grp_id, double enableMovejMovejBlend)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetEnableMovejmovejblend);
        enableMovejMovejBlend_ = enableMovejMovejBlend;
    };
    ~CmdSetEnableMovejmovejblend() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double enableMovejMovejBlend_;
};

class CmdSetCartJogAcc : public mot::MultiRobCmd
{
public:
    CmdSetCartJogAcc(int grp_id, const double* step_jog_ori_acc, const double* step_jog_pos_acc)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetCartJogAcc);
        for (int i = 0; i < 7; i++) { step_jog_ori_acc_[i] = step_jog_ori_acc[i]; }
        for (int i = 0; i < 7; i++) { step_jog_pos_acc_[i] = step_jog_pos_acc[i]; }
    };
    ~CmdSetCartJogAcc() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double step_jog_ori_acc_[7];
    double step_jog_pos_acc_[7];
};

class CmdSetTermCond : public mot::MultiRobCmd
{
public:
    CmdSetTermCond(int grp_id, double tolerance, int termCond)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetTermCond);
        tolerance_ = tolerance;
        termCond_ = termCond;
    };
    ~CmdSetTermCond() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    double tolerance_;
    int termCond_;
};

class CmdSetDebug : public mot::MultiRobCmd
{
public:
    CmdSetDebug(int grp_id, int debug)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetDebug);
        debug_ = debug;
    };
    ~CmdSetDebug() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int debug_;
};

class CmdFsEnable : public mot::MultiRobCmd
{
public:
    CmdFsEnable(int grp_id, int mode)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdFsEnable);
        mode_ = mode;
    };
    ~CmdFsEnable() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int mode_;
};

class CmdSsEnable : public mot::MultiRobCmd
{
public:
    CmdSsEnable(int grp_id, int mode)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSsEnable);
        mode_ = mode;
    };
    ~CmdSsEnable() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int mode_;
};

class CmdAfEnable : public mot::MultiRobCmd
{
public:
    CmdAfEnable(int grp_id, int enable)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdAfEnable);
        enable_ = enable;
    };
    ~CmdAfEnable() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int enable_;
};

class CmdSetOperationmodeOption : public mot::MultiRobCmd
{
public:
    CmdSetOperationmodeOption(int grp_id, int enable)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetOperationmodeOption);
        enable_ = enable;
    };
    ~CmdSetOperationmodeOption() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };

    int enable_;
};

class CmdSetDragEnable : public mot::MultiRobCmd
{
public:
    CmdSetDragEnable(int grp_id, int enable)
    {
        group_id_ = grp_id;
        enable_ = enable;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetDragEnable);
    };
    ~CmdSetDragEnable() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
    int enable_;
};

class CmdSetRobotPayload : public mot::MultiRobCmd
{
public:
    CmdSetRobotPayload(int grp_id, int id)
    {
        group_id_ = grp_id;
        id_ = id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetRobotPayload);
    };
    ~CmdSetRobotPayload() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
    int id_;
};

class CmdSetPayload : public mot::MultiRobCmd
{
public:
    CmdSetPayload(int grp_id, int id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetPayload);
        id_ = id;
    };
    ~CmdSetPayload() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
    int id_;
};

class CmdServoHome : public mot::MultiRobCmd
{
public:
    CmdServoHome(int grp_id, int joint)
    {
        group_id_ = grp_id;
        joint_ = joint;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdServoHome);
    };
    ~CmdServoHome() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
    int joint_;
};

class CmdClearError : public mot::MultiRobCmd
{
public:
    CmdClearError(int grp_id)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdClearError);
    };
    ~CmdClearError() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
};

class DynCmdStartDynamicsIdentify : public CmdServojop
{
public:
    DynCmdStartDynamicsIdentify(int grp_id) : CmdServojop(grp_id, true)
    {
        group_id_ = grp_id;
        cmd_name_ = MOTION_CMD_CLASS_NAME(DynCmdStartDynamicsIdentify);
    };
    ~DynCmdStartDynamicsIdentify() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };

    int friction_compensate_[9];
};

class CmdSetBaseOffset : public mot::MultiRobCmd
{
public:
    CmdSetBaseOffset(int grp_id, const double* base_offset)
    {
        group_id_ = grp_id;
        for (int i = 0; i < 6; i++) { base_offset_[i] = base_offset[i]; }
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetBaseOffset);
    };
    ~CmdSetBaseOffset() {}

    virtual int active_callback() { return 0; };
    virtual int process();
    virtual int check_para() { return 0; };
    double base_offset_[6];
};

class CmdSetSimRobot : public mot::MultiRobCmd
{
public:
    CmdSetSimRobot(int grp_id, int sim_serial_num)
    {
        group_id_ = grp_id;
        sim_serial_num_ = sim_serial_num;
        cmd_name_ = MOTION_CMD_CLASS_NAME(CmdSetSimRobot);
    };
    ~CmdSetSimRobot() {}

    virtual int active_callback();
    virtual int process();
    virtual int check_para() { return 0; };
    int sim_serial_num_;
};
